package com.joelemon.mockinfluxdbdata.common;


import lombok.Data;

@Data
public class SystemException extends RuntimeException {

    private String code;
    private String msg;

    public SystemException(String msg) {
        this.code = ResultCode.FAILED.getCode();
        this.msg = msg;
    }

    public SystemException(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public SystemException(ResultCode resultCode) {
        this.code = resultCode.getCode();
        this.msg = resultCode.getDesc();
    }
}
